package com.olinsports.system.olinsportssystem.repository;

import com.olinsports.system.olinsportssystem.model.MemberInformation;
import com.olinsports.system.olinsportssystem.model.SavingDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * Created by Administrator on 2017/7/23.
 */
@Mapper
@CacheConfig(cacheNames = "savingDetail")
public interface MemberInformationRepository {
    @Cacheable
    public MemberInformation selectByMemberKey(int memberKey);

    @Cacheable
    public List<MemberInformation> selectByDateLimit(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("beg") int beg, @Param("end") int end);

    @Cacheable
    public List<MemberInformation> selectByDateAll(@Param("startDate") String startDate,@Param("endDate") String endDate);

    @Cacheable
    public int selectSelfCount(@Param("fieldValue") String fieldValue);

    @Cacheable
    public  List<MemberInformation>  selectSelfLimit(@Param("fieldValue") String fieldValue,@Param("beg") int beg, @Param("end") int end);

    @Cacheable
    public int findCount();

    @Cacheable
    public List<MemberInformation> findLimit(@Param("sord") String sord, @Param("sidx") String sidx, @Param("beg") int beg, @Param("end") int end);

    @Cacheable
    public int selectByDateCount(@Param("startDate") String startDate,@Param("endDate") String endDate);

    @Cacheable
    public int insertAll(MemberInformation memberInformation);

    @Cacheable
    public int updateData(MemberInformation memberInformation);

    @Cacheable
    public List<MemberInformation> selectAll();

    @Cacheable
    public MemberInformation selectByVipNum(String vipNum);
}
